package com.kai.configuration;

import com.kai.interceptor.TokenInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

//只拦截spring项目里的请求
@Configuration
public class InterceptorConfiguration implements WebMvcConfigurer {

//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(new TokenInterceptor()) //注册拦截器
//                .addPathPatterns("/**") //添加拦截路径
//                .excludePathPatterns("/login"); //添加不拦截路径
//    }


}
